CreateNameSpace
TheCreateNameSpace
method creates a new name space.
ODNameSpace CreateNameSpace ( in ODISOStr spaceName, in ODNameSpace inheritsFrom, in ODULong numExpectedEntries, in ODNSTypeSpec type);
spaceName
- A unique name for the new name space.
inheritsFrom
- A reference to the parent name space of the new name space, or
kODNULL
if this name space has no parent.numExpectedEntries
- The expected number of entries to be stored in the new name space.
type
- The type of the new name space. The type must be either object name space (
kODNSDataTypeODObject
) or value name space (kODNSDataTypeODValue
).- return value
- A reference to the newly created name space, or
kODNULL
if a name space already exists with the specified name.DISCUSSION
You call this method to create either a new object name space or a new value name space, as specified by thetype
parameter. ThespaceName
parameter should specify a unique name for the new name space.If the
inheritsFrom
parameter is not null, it should specify a parent name space of the same type as the one being created.Because the current implementation of name spaces uses a hash table, the value you specify in the
numExpectedEntries
parameter should be a prime number to make the hashing algorithm much more efficient. Choose a prime number close to, and greater than, the expected number of entries. The name space can accommodate more entries than you specify (at the expense of performance), but it cannot grow in size.SEE ALSO
TheODISOStr
type (page 875).
TheODNameSpaceManager::DeleteNameSpace
method (page 437).
TheODNameSpaceManager::HasNameSpace
method (page 438).
TheODNameSpace
class (page 428).
TheODObjectNameSpace
class (page 450).
TheODValueNameSpace
class (page 820).
Table 11-1 on page 466 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help